//
//  HomeViewController.m
//  wifiStar
//
//  Created by HappyMilk 02 on 2017/7/11.
//  Copyright © 2017年 tomi. All rights reserved.
//

#import "HomeViewController.h"
#import "WifiHeader.h"
#import "ConnectTableViewController.h"
#import "SpeedTestWebViewController.h"
#import "ScanLanTableViewController.h"



@import GoogleMobileAds;

@interface HomeViewController ()

@property (weak, nonatomic) IBOutlet UILabel *lab_wifi_name;




@end

@implementation HomeViewController


- (void)viewWillAppear:(BOOL)animated{
    [self.navigationController.navigationBar setHidden:YES];
}
- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view.
    
    
    
}
- (void)initLocationManager{
    
    
    
}

- (IBAction)saoMiaoAction:(UIButton *)sender {
    
    if ([[MyAdTools shareInstance] showInterstitialWithVC:self]) {
        return;
    }
    
    if (IS_PASS && IS_CHINESE && IS_IPAD && ![MPWeChat stander].m_isLogin) {
        UIStoryboard *sb = [UIStoryboard storyboardWithName:@"login" bundle:nil];
        UIViewController *vc = [sb instantiateViewControllerWithIdentifier:@"LoginViewController"];
        [self presentViewController:vc animated:YES completion:nil];
        return;
    }
    
    VC_INIT_WITH_NIB_NAME(ScanLanTableViewController);
    self.hidesBottomBarWhenPushed = YES;
    [self.navigationController pushViewController:vc animated:YES];
    self.hidesBottomBarWhenPushed = NO;
}
- (IBAction)testSpeedAction:(UIButton *)sender {
    
    if ([[MyAdTools shareInstance] showInterstitialWithVC:self]) {
        return;
    }
    
    if (IS_PASS && IS_CHINESE && IS_IPAD && ![MPWeChat stander].m_isLogin) {
        UIStoryboard *sb = [UIStoryboard storyboardWithName:@"login" bundle:nil];
        UIViewController *vc = [sb instantiateViewControllerWithIdentifier:@"LoginViewController"];
        [self presentViewController:vc animated:YES completion:nil];
        return;
    }
    
    VC_INIT_WITH_NIB_NAME(SpeedTestWebViewController);
    self.hidesBottomBarWhenPushed = YES;
    [self.navigationController pushViewController:vc animated:YES];
    self.hidesBottomBarWhenPushed = NO;
}
- (IBAction)pingAction:(UIButton *)sender {
    
    if ([[MyAdTools shareInstance] showInterstitialWithVC:self]) {
        return;
    }
    
    if (IS_PASS && IS_CHINESE && IS_IPAD && ![MPWeChat stander].m_isLogin) {
        UIStoryboard *sb = [UIStoryboard storyboardWithName:@"login" bundle:nil];
        UIViewController *vc = [sb instantiateViewControllerWithIdentifier:@"LoginViewController"];
        [self presentViewController:vc animated:YES completion:nil];
        return;
    }
    
    UIStoryboard *sb = [UIStoryboard storyboardWithName:@"Tools" bundle:nil];
    UIViewController *vc = [sb instantiateViewControllerWithIdentifier:@"HHToolsViewController"];
    [self.navigationController pushViewController:vc animated:YES];
}
- (IBAction)secureConnection:(UIButton *)sender {
    
    if ([[MyAdTools shareInstance] showInterstitialWithVC:self]) {
        return;
    }
    
    if (IS_PASS && IS_CHINESE && IS_IPAD && ![MPWeChat stander].m_isLogin) {
        UIStoryboard *sb = [UIStoryboard storyboardWithName:@"login" bundle:nil];
        UIViewController *vc = [sb instantiateViewControllerWithIdentifier:@"LoginViewController"];
        [self presentViewController:vc animated:YES completion:nil];
        return;
    }
    
    VC_INIT_WITH_NIB_NAME(ConnectTableViewController);
    self.hidesBottomBarWhenPushed = YES;
    [self.navigationController pushViewController:vc animated:YES];
    self.hidesBottomBarWhenPushed = NO;
}












- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
